//
//  HELHomeCell.m
//  HandheldELearn
//
//  Created by wsj2015 on 16/7/11.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "HELHomeCell.h"
//#import "UIImageView+UIActivityIndicatorForSDWebImage.h"
#import "UIImageView+BTimageView.h"
@implementation HELHomeCell

- (void)awakeFromNib {
    // Initialization code
    //适配屏幕
    [super awakeFromNib];
   
    CGFloat f = kScreenFactor;
    self.iconHeight.constant =f * 100;
    //    [self.iconImageView setImageWithURL:[NSURL URLWithString:model.smallpicUrl ] usingActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    //    self.iconImageView.layer.borderColor = kBorderColor.CGColor;
    //    self.iconImageView.layer.borderWidth = 1;
   
    
}
- (void)setModel:(HELCourseListModel *)model{
   
    [self.iconImageView nc_setImageWithUrl:model.courseImage];
    self.scanLabel.text = [NSString stringWithFormat:@"%@",model.viewNum];
    self.title.text = model.courseName;
    self.commentCountLabel.text = [NSString stringWithFormat:@"¥%.2f",[model.coursePrice floatValue]];
    
    if ([model.coursePrice floatValue] <=0 ) {
        self.commentCountLabel.text = @"";
    } else{
        self.commentCountLabel.text =  [NSString stringWithFormat:@"¥%.2f",[model.coursePrice doubleValue] ];
    }
    
    
    
    
//    if (model.videoImage) {
//         [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.videoImage] placeholderImage:[UIImage imageNamed:@"暂无图片.jpg"]];
//    }else{seh
//        [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.attachUrlShow] placeholderImage:[UIImage imageNamed:@"暂无图片.jpg"]];
//    }
//
//    
//    self.title.text = model.name;
////    if (model.viewNum) {
////      self.scanLabel.text  = [NSString stringWithFormat:@"%@",model.viewNum];
////    }else{
////     self.scanLabel.text  =@"0";
////    }
//   
////    self.commentCountLabel.text = [NSString stringWithFormat:@"%@",model.commentNum];
  
}
@end
